<template>
  <div class="container">
    <div id="myChart" class="chart"></div>
  </div>
</template>
<script>

/* 柱状图 */
export default {
  data() {
    return {};
  },
  created() {},
  mounted() {
    this.paintLine();
  },
  methods: {
    paintLine() {
      let myChart = this.$echarts.init(document.getElementById("myChart"));
      myChart.setOption({
        title: { text: "echarts" },
        tooltip: {},
        xAxis: {
          type: "category",
          data: ["01", "02", "03", "04", "05", "06"]
        },
        yAxis: {},
        series: [
          {
            name: "test",
            type: "bar",
            data: [5, 20, 36, 10, 10, 20]
          }
        ]
      });
    }
  }
};
</script>
<style lang='scss' type='text/scss' scoped>
.container {
    .chart{
        width: 100%;
        height: 5rem;
    }
}
</style>    